package day0626;

public class Test10 {
    public static void main(String[] args) {
        System.out.println(judgeMonth(6, 2023));
    }

    public static    int   judgeMonth(int month, int year){
        if(month==1|| month==3||month==5 || month==7||month==8 || month==10||month==12){
            return 31;
        }else if(month==4|| month==6||month==9 || month==11 ){
            return 30;
        }else if(month==2  &&  (year%400==0 ||  (year%4==0 && year %100 != 0))){
            return 29;
        }else if(month==2){
            return 28;
        }else{
            return -1;
        }
    }  //定义一个方法getLeapYear(int start, int end)//找到所有的闰年存储到一个years数组中

}
